import request from '@/utils/request'

// 根据角色查询关联人员列表-无分页
export function accountListByRole(query) {
  return request({
    url: '/system/operationRole/accountListByRole',
    method: 'get',
    params: query
  })
}


// 删除关联账号
export function deleteAccountFromRole(query) {
  return request({
    url: '/system/operationRole/deleteAccountFromRole',
    method: 'get',
    params: query
  })
}

// 查询运营角色列表
export function listOperationRole(query) {
  return request({
    url: '/system/operationRole/list',
    method: 'get',
    params: query
  })
}

// 获取运营菜单
export function operationRoleMenuList(query) {
  return request({
    url: '/system/operationRole/operationMenuList',
    method: 'get',
    params: query
  })
}

// 查询运营角色详细
export function getOperationRole(id) {
  return request({
    url: '/system/operationRole/' + id,
    method: 'get'
  })
}

// 新增运营角色
export function addOperationRole(data) {
  return request({
    url: '/system/operationRole',
    method: 'post',
    data: data
  })
}

// 修改运营角色
export function updateOperationRole(data) {
  return request({
    url: '/system/operationRole',
    method: 'put',
    data: data
  })
}

// 删除运营角色
export function delOperationRole(id) {
  return request({
    url: '/system/operationRole/' + id,
    method: 'delete'
  })
}
